class C
  def a_method
    "C#a_method()"
  end
end

class D < C; end

obj = D.new
obj.a_method

p D.ancestors

class << obj
  def a_single_method
    "obj#a_single_method()"
  end
end

p obj.singleton_methods
p obj.singleton_class
p obj.singleton_class.superclass